package com.hnkywl.sts.action.report;

import com.hnkywl.sts.service.report.WlygyswlService;
import com.hnkywl.sts.service.report.WlykhwlService;
import net.ruixin.web.struts2.SimpleActionSupport;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Date;

/**
 * Created with IntelliJ IDEA.
 * User: Administrator
 * Date: 13-6-14
 * Time: 下午4:48
 * To change this template use File | Settings | File Templates.
 */
@Namespace("/report/wlykhwl")
public class WlykhwlAction extends SimpleActionSupport {
    private Long gsId;
    private Integer year;
    private Integer month;
    private Date date;
    private int page;
    private int rows;

    private WlykhwlService wlykhwlService;
    private Date endDate;
    private String khMc;


    @Action("wlykhwl")
    public String cwsfc() {
        endDate = new Date();
        return SUCCESS;
    }

    @Action("wlykhwlList")
    public void cwsfcList() {
        String json = wlykhwlService.wlykhwlList(gsId, endDate, khMc, page, rows);
        renderJson(json);
    }


    public Long getGsId() {
        return gsId;
    }

    public void setGsId(Long gsId) {
        this.gsId = gsId;
    }

    public Integer getYear() {
        return year;
    }

    public void setYear(Integer year) {
        this.year = year;
    }

    public Integer getMonth() {
        return month;
    }

    public void setMonth(Integer month) {
        this.month = month;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public int getRows() {
        return rows;
    }

    public void setRows(int rows) {
        this.rows = rows;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public String getKhMc() {
        return khMc;
    }

    public void setKhMc(String khMc) {
        this.khMc = khMc;
    }

    @Autowired
    public void setWlykhwlService(WlykhwlService wlykhwlService) {
        this.wlykhwlService = wlykhwlService;
    }
}
